The present invention relates to the art of industrial controllers, and more particularly to a method and apparatus for strobed synchronization in a distributed control system.
Industrial controllers are special purpose computers used for controlling industrial processes, manufacturing equipment, and other factory automation applications. In accordance with a control program, an industrial controller may measure one or more process variables or inputs reflecting the status of a controlled process, and change outputs effecting control of the process. The inputs and outputs may be binary, (e.g., on or off), as well as analog inputs and outputs assuming a continuous range of values. The control program may be executed in a series of execution cycles with batch processing capabilities.
The measured inputs received from a controlled process and the outputs transmitted to the process generally pass through one or more input/output (I/O) modules. These I/O modules serve as an electrical interface between the controller and the controlled process, and may be located proximate or remote from the controller. The inputs and outputs are recorded in an I/O table in processor memory. Input values may be asynchronously read from the controlled process by one or more input modules and output values are written directly to the I/O table by the processor for subsequent communication to the process by specialized communications circuitry. An output module may interface directly with a controlled process, by providing an output from an I/O table to an actuator such as a motor, valve, solenoid, and the like.
During execution of the control program, values of the inputs and outputs exchanged with the controlled process pass through the I/O table. The values of inputs in the I/O table are asynchronously updated from the controlled process by dedicated scanning circuitry. This scanning circuitry may communicate with input and/or output modules over a bus on a backplane or network communications. The scanning circuitry also asynchronously writes values of the outputs in the I/O table to the controlled process. The output values from the I/O table are then communicated to one or more output modules for interfacing with the process. Thus, the processor may simply access the I/O table rather than needing to communicate directly with the controlled process.
An industrial controller may be customized to a particular process by writing control software that may be stored in the controller""s memory and/or by changing the hardware configuration of the controller to match the control task. In distributed control systems, controller hardware configuration is facilitated by separating the industrial controller into a number of control modules, each of which performs a different function. Particular control modules needed for the control task may then be connected together on a common backplane within a rack and/or through a network or other communications medium. The control modules may include processors, power supplies, network communication modules, and I/O modules exchanging input and output signals directly with the controlled process. Data may be exchanged between modules using a backplane communications bus, which may be serial or parallel, or via a network. In addition to performing I/O operations based solely on network communications, smart modules exist which may execute autonomous logical or other programs.
Various control modules of a distributed industrial control system may be spatially distributed along a common communication link in several racks. Certain I/O modules may thus be located in close proximity to a portion of the control equipment, and away from the remainder of the controller. Data is communicated with these remote modules over a common communication link, or network, wherein all modules on the network communicate using a standard communications protocol.
In a typical distributed control system, one or more I/O modules are provided for interfacing with a process. The outputs derive their control or output values in the form of a message from a master or peer device over a network or a backplane. For example, an output module may receive an output value from a processor, such as a programmable logic controller (PLC), via a communications network or a backplane communications bus. The desired output value is generally sent to the output module in a message, such as an I/O message. The output module receiving such a message will provide a corresponding output (analog or digital) to the controlled process. Input modules measure a value of a process variable and report the input values to a master or peer device over a network or backplane. The input values may be used by a processor (e.g., a PLC) for performing control computations.
Conventional control devices typically provide a run mode wherein a module executes a control program and a configure mode wherein the control program execution is suspended. As control systems become more widely distributed, the logic or control program associated with a particular process or system may be executed on a large number of modules or devices. In this way, individual processors in the devices execute a program autonomously from the rest of the system components. Smart devices, such as I/O modules, transducers, sensors, valves, and the like may thus be programmed to execute certain logical or other programs or operations independently from other such devices.
The distribution of smart devices in a networked control system has many advantages. However, system testing and troubleshooting are often more difficult in distributed systems. In a system with many autonomous smart devices, each having its own control logic or program, problems in system performance cannot easily be traced to a specific device. Once the component devices in such a system are placed into execute or run mode, the logic or control programs associated therewith run independently, and are often not synchronized. Even where certain control devices in a system are synchronized to certain events, determining the source of a system control problem is still difficult.
In many cases, the source of a control problem is an error in programming a particular module. For example, the logic function in a particular module may be the function of several input values or states. Problems in the logic function may only be discernable in one or a small number of input combinations. In widely distributed control system architectures, system events occur asynchronously, such as I/O value state changes, messages, etc. Thus, when a problem occurs, it may be difficult to determine the source of the error.
This is particularly problematic in system startup situations. Large control systems are typically tested before application to a real process, with inputs simulated and outputs tested under a variety of input conditions. In addition, control system diagnostics are needed in the field, when problems in system performance are recognized, or when system parameters are changed. Present diagnostic tools are typically limited to simulating input signals and monitoring output values. Conventional control devices do not provide for ease of troubleshooting in such distributed control system applications.
In accordance with the present invention, a method and system are provided for executing a control function or program which minimizes or overcomes the shortcomings of conventional systems. The invention allows a user of a distributed control system to place one or more control devices into a step mode, wherein the devices will execute a specified number of iterations of their internal logic or control programs, or execute such programs for a specified time period, and then stop or suspend execution. The user may then perform system diagnostics, for example, by interrogating certain modules to obtain status information, output and input values, and the like. The system may then be further iterated and the method repeated, so as to enable the identification of logic programming and/or hardware problems in a system. The system and methodology of the present invention thereby provide for significantly improved diagnostic and troubleshooting capabilities over conventional systems.
In accordance with one aspect of the invention, there is provided a method of performing a function in a control device comprising storing a program in the control device, receiving a message from the communications medium, wherein the message includes a parameter, executing at least a portion of the stored program in the control device according to the parameter, and suspending or stopping execution of the stored program according to the parameter. The message may put the device into a step mode, or may cause execution of at least a portion of the program in a device which is already in a step mode by virtue of, for example, a previous mode change message. The method allows a user to begin execution of a control device program or internal logic for a limited or specified time period or number of logic iterations, after which the device will suspend execution.
According to another aspect of the invention, the device may provide data to the communications medium in response to a data request message from the network while execution of the stored program is suspended. This allows a user to diagnose or analyze the system state in order to facilitate troubleshooting of system problems. In addition, the invention further allows the user to repeat the execution of a portion of the program and to again suspend execution via, for example, another message from the communications medium. In this way, a process and associated control system can be iterated or single stepped in a controlled manner, with the capability of data analysis between execution iterations.
In accordance with another aspect of the invention, a network message may include a step type and a parameter, wherein the step type is a timed step and the parameter is a step time value. In response the device may execute the stored program for a fixed time period according to the step time value, and stop program execution after the fixed time period. Thus, a user may, for example, start a device for 3 seconds, after which the condition of the system I/O can be verified.
Still another aspect of the invention provides a message wherein the step type is step iteration, and the parameter is an integer number of iterations. Upon receipt of this type of message, the device may execute the stored program an integer number of times according to the parameter, and then stop program execution after the integer number of iterations. In this manner, a user may cause one or more devices in a distributed control system to perform N iterations of their internal logic programs, where N is an integer, after which the state of the controlled process may be interrogated.
The invention further contemplates that many such distributed control system devices can be interconnected (e.g., via a network or other communications medium), and that one, some, and/or all such devices may respond to such a step command message in the above manner. Thus the invention includes the capability to iterate an entire distributed control system with one such message.
In accordance with yet another aspect of the invention, there is provided a system for performing a control function comprising a control device adapted to execute a stored program and to receive messages from a communications medium, and a master device adapted to send a message to the control device via the communications medium, the message comprising a parameter, wherein the control device is further adapted to execute at least a portion of the stored program according to the parameter and to subsequently suspend execution of the stored program according to the parameter. The system allows a user to perform diagnostics and troubleshooting heretofore unavailable with conventional distributed control system products. The message may comprise, for example, a step type, and the control device may be adapted to execute at least a portion of the stored program and suspend execution of the stored program according to the step type.
According to another aspect of the system, the step type may be, for example, a timed step and the parameter may be a step time value. In this regard, the control device may be adapted to execute the stored program for a fixed time period according to the step time value, and to stop execution of the stored program after the fixed time period. This allows a user to perform time sliced operation of one, some, or all of the control devices in a distributed control system, with the capability of data analysis between fixed time execution periods.
According to still another aspect of the invention, the step type may be step iteration, and the parameter may be an integer number of iterations. The control device, for example, may be adapted to execute the stored program an integer number of times according to the parameter, and to stop execution of the stored program after the integer number of iterations. This aspect of the invention allows a user to perform single step operation of one, some, or all of the control devices in a distributed control system, with the capability of data analysis between iterations.
In accordance with yet another aspect of the invention, there is provided a method of performing a function in a control device comprising providing a control device adapted to selectively execute a program and to receive messages from a network, receiving a mode change message from the network, suspending execution of the program according to the mode change message, receiving a step command message from the network, executing at least a portion of the program in the control device according to the message, and suspending execution of the program according to the message.
To the accomplishment of the foregoing and related ends, the invention, then, comprises the features hereinafter fully described. The following description and the annexed drawings set forth in detail certain illustrative aspects of the invention. However, these aspects are indicative of but a few of the various ways in which the principles of the invention may be employed. Other aspects, advantages and novel features of the invention will become apparent from the following detailed description of the invention when considered in conjunction with the drawings.